<?php /* Smarty version Smarty-3.1.18, created on 2015-09-28 15:11:18
         compiled from "E:\www\gfour\ws\Admin\View\Chat\library.html" */ ?>
<?php /*%%SmartyHeaderCode:286055608e816e576c1-02270744%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '2467b665009a0066b6b7c9705ada051ccd8165e8' => 
    array (
      0 => 'E:\\www\\gfour\\ws\\Admin\\View\\Chat\\library.html',
      1 => 1443404008,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '286055608e816e576c1-02270744',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    '_C' => 0,
    'timeoutReal' => 0,
    'pv' => 0,
    'uv' => 0,
    'sql_list' => 0,
    'sql' => 0,
    'list_page' => 0,
    'now' => 0,
    'refresh' => 0,
    'time' => 0,
    'nowReal' => 0,
    'timestampReal' => 0,
    'refreshtimeReal' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.18',
  'unifunc' => 'content_5608e817017002_57515944',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_5608e817017002_57515944')) {function content_5608e817017002_57515944($_smarty_tpl) {?><?php if (!is_callable('smarty_modifier_date_format')) include 'E:\\www\\gfour\\ws\\Qiaqia\\Vendor\\Smarty\\plugins\\modifier.date_format.php';
?><!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<link rel="stylesheet" type="text/css" href="<?php echo $_smarty_tpl->tpl_vars['_C']->value['hy_path'];?>
css/amazeui.min.css"/>
		<link rel="stylesheet" type="text/css" href="<?php echo $_smarty_tpl->tpl_vars['_C']->value['hy_path'];?>
css/hy.admin.css"/>
		<link rel="stylesheet" type="text/css" href="<?php echo $_smarty_tpl->tpl_vars['_C']->value['hy_path'];?>
css/jquery.confirm.css"/>
	</head>
	<body>
		<div class="am-g">
			 <?php echo $_smarty_tpl->getSubTemplate ('../Common/hy_header.html', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>

      <div class="am-fl am-cf">
      	<p><span id="timeout" style="color:red;font-size:30px;"><?php echo $_smarty_tpl->tpl_vars['timeoutReal']->value;?>
</span>秒后刷新</p>
		<p style="font-size:20px;">2分钟前的浏览量:<strong style="font-size:25px;color:#0e90d2"> <?php echo (($tmp = @$_smarty_tpl->tpl_vars['pv']->value)===null||$tmp==='' ? '0' : $tmp);?>
 </strong>
		登陆量:<strong style="font-size:25px;color:#0e90d2"> <?php echo (($tmp = @$_smarty_tpl->tpl_vars['uv']->value)===null||$tmp==='' ? '0' : $tmp);?>
 </strong></p>
          <div class="am-btn-toolbar am-fl">
            <div class="am-btn-group am-btn-group-xs">
              <a  href="javascript:void(0);" onclick="clearNopass()" id="Nopass_html"  class="am-btn am-btn-default hy-js-href"><span class="am-icon-plus"></span> 清空未经过审核</a>
            </div>
          </div>
		  <div class="am-btn-toolbar am-fl">
            <div class="am-btn-group am-btn-group-xs">
              <a  href="javascript:void(0);" onclick="temCheckAll()" id="temCheckAll_html"  class="am-btn am-btn-default hy-js-href"><span class="am-icon-plus"></span> 勾选添加至实时审核</a>
            </div>
			<div class="am-btn-group am-btn-group-xs">
              <a  href="javascript:void(0);" onclick="refreshNow()" id="refresh_html"  class="am-btn am-btn-default hy-js-href"><span class="am-icon-plus"></span> 刷新</a>
            </div>
          </div>
	</div>
	</div>
      <div class="am-g">
      <div class="am-u-sm-12">
        <div class="am-form">
          <table class="am-table am-table-striped am-table-hover table-main">
            <thead>
              <tr>
              	<th width="10%" class="table-check"><input class="hy-js-selectall" type="checkbox" />全选/全不选</th>
				<th width="10%" class="table-type">昵称</th>
				<th width="40%" class="table-type">评论</th>
				<th width="10%" class="table-type">状态</th>
				<th width="10%" class="table-type">加精</th>
				<th width="10%" class="table-author">提交时间</th>
				<th width="15%" class="table-author">操作</th>
				
              </tr>
          </thead>
          <tbody>
          	   <!--<?php  $_smarty_tpl->tpl_vars['sql'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['sql']->_loop = false;
 $_smarty_tpl->tpl_vars['key'] = new Smarty_Variable;
 $_from = $_smarty_tpl->tpl_vars['sql_list']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['sql']->key => $_smarty_tpl->tpl_vars['sql']->value) {
$_smarty_tpl->tpl_vars['sql']->_loop = true;
 $_smarty_tpl->tpl_vars['key']->value = $_smarty_tpl->tpl_vars['sql']->key;
?>-->
            <tr>
              <td><input class="hy-js-id" name="ids" type="checkbox" data-temp-status="<?php echo $_smarty_tpl->tpl_vars['sql']->value['status'];?>
"  value="<?php echo $_smarty_tpl->tpl_vars['sql']->value['id'];?>
"/></td>
              <td onClick="checkedthis(this)"><?php echo $_smarty_tpl->tpl_vars['sql']->value['nickname'];?>
</td>
              <td onClick="checkedthis(this)"><?php echo (($tmp = @$_smarty_tpl->tpl_vars['sql']->value['comment'])===null||$tmp==='' ? " - " : $tmp);?>
</td>
			  <td onClick="checkedthis(this)"><?php echo (($tmp = @$_smarty_tpl->tpl_vars['sql']->value['statusShow'])===null||$tmp==='' ? " - " : $tmp);?>
</td>
			  <td><input <?php if ($_smarty_tpl->tpl_vars['sql']->value['addStatus']==1) {?>checked=checked<?php }?> type="checkbox" onclick="addDigest(<?php echo $_smarty_tpl->tpl_vars['sql']->value['id'];?>
,this)" name="addStatus"></td>
			  <td onClick="checkedthis(this)"><?php echo smarty_modifier_date_format($_smarty_tpl->tpl_vars['sql']->value['addtime'],"Y-m-d");?>
</td>
     		  <td><div><div><a onclick="silence(<?php echo $_smarty_tpl->tpl_vars['sql']->value['wxid'];?>
)" >禁止该用户发言    </a><?php if ($_smarty_tpl->tpl_vars['sql']->value['status']==6) {?><a onclick="temCheck('<?php echo $_smarty_tpl->tpl_vars['sql']->value['id'];?>
')">临时审核<?php }?><a data-param ="{ url:'index.php?g=admin&m=chat&a=delRecord&id=<?php echo $_smarty_tpl->tpl_vars['sql']->value['id'];?>
',hide:4}" class=" am-btn-xs am-text-danger hy-js-del" > 删除</a></div></div></td>
            </tr>
                  <!--<?php } ?>-->  
          </tbody>
        </table>
          <div class="am-cf">

  <div class="am-fr">
  <?php echo $_smarty_tpl->tpl_vars['list_page']->value;?>

  </div>
</div>
          <hr />
      
        </div>
      </div>

    </div>
    </div>
   <?php echo $_smarty_tpl->getSubTemplate ('../Common/hy_footer.html', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>

   <script type="text/javascript" src="<?php echo $_smarty_tpl->tpl_vars['_C']->value['hy_path'];?>
js/Map.js"></script>
   <script type="text/javascript" src="<?php echo $_smarty_tpl->tpl_vars['_C']->value['hy_path'];?>
js/bin.select.js"></script>
   <script src="<?php echo $_smarty_tpl->tpl_vars['_C']->value['hy_path'];?>
js/jquery.confirm.js"></script>
   <script type="text/javascript">
//   		var now = parseInt('<?php echo $_smarty_tpl->tpl_vars['now']->value;?>
');
//		var refresh = parseInt('<?php echo $_smarty_tpl->tpl_vars['refresh']->value;?>
');
//		var time = parseInt('<?php echo $_smarty_tpl->tpl_vars['time']->value;?>
');
//		var timeout = refresh-(now-time)%refresh;
	var now = parseInt('<?php echo $_smarty_tpl->tpl_vars['nowReal']->value;?>
');
	var timestamp = parseInt('<?php echo $_smarty_tpl->tpl_vars['timestampReal']->value;?>
');
	var refresh = parseInt('<?php echo $_smarty_tpl->tpl_vars['refreshtimeReal']->value;?>
');
	var timeout = refresh-(now-timestamp)%refresh;
		$(function(){
				inter = setInterval('countDown()',1000);
		})
		function checkedthis(params){
			if($(params).parent().find("input[name=ids]").attr("checked")!="checked"){
				$(params).parent().find("input[name=ids]").prop("checked","checked");
			}else{
				$(params).parent().find("input[name=ids]").prop('checked',"");
			}
		}
		function countDown(){
			timeout--;
			$("#timeout").html(timeout);
			if (timeout<=0) {
				clearInterval(inter);
				//window.history.go(0);
				window.location.href="index.php?g=admin&m=chat&a=library";
			}else{
				
			}
		}
	function refreshNow(){
		$("#refresh_html").html("<span class='am-icon-plus'></span> 刷新中...");
		parent.$('#library').attr('src', parent.$('#library').attr('src'));
	}
	function silence(wxid){
		jq_confirm("提醒","确定禁言该用户？",function(status){
			var data = {
				"status":status,
				"wxid":wxid
			}
			var url = "/ws/index.php?g=admin&m=chat&a=silenceUser";
			$.post(url,data,function(res){
				if(res.error==1){
						alert(res.content);
					}else{
						alert(res.content);
					}
			},"json")
		})
	}
	function jq_confirm(title,message,func){
				$.confirm({
				'title'		: title,
				'message'	: message,
				'buttons'	: {
					'禁言1小时'	: {
						'class'	: 'blue',
						'action': function(){
							func(1);
							$.confirm.hide();
						}
					},
					'禁言5天'	: {
						'class'	: 'blue',
						'action': function(){
							func(2);
							$.confirm.hide();
						}
					},
					'取消'	: {
						'class'	: 'gray',
						'action': function(){
							$.confirm.hide();
						}	// Nothing to do in this case. You can as well omit the action property.
					}
				}
			});
		}
	function clearNopass(){
		jq_confirm2("提醒","确定清空全部未经过审核数据？",function(){
			$("#Nopass_html").html("<span class='am-icon-plus'></span> 清理中...");
			var url = "/ws/index.php?g=admin&m=chat&a=clearNopass";
			$.post(url,"",function(data){
				if(data.error==0){
					//$('.bin-select-searchbtn').click();
					//window.history.go(0);
					window.location.href="index.php?g=admin&m=chat&a=library";
				}else{
					alert(data.content);
				}
			$("#Nopass_html").html("<span class='am-icon-plus'></span>  清空未审核");
			},'json');
		})
	}
	function jq_confirm2(title,message,func){
				$.confirm({
				'title'		: title,
				'message'	: message,
				'buttons'	: {
					'是'	: {
						'class'	: 'blue',
						'action': function(){
							func();
							$.confirm.hide();
						}
					},
					'否'	: {
						'class'	: 'gray',
						'action': function(){
							$.confirm.hide();
						}	// Nothing to do in this case. You can as well omit the action property.
					}
				}
			});
		}
		function addDigest(id,params){
			
				var url = "/ws/index.php?g=admin&m=chat&a=addDigest";
				var data={
					'id':id
				}
				$.post(url,data,function(res){
					if(res.error==0){
						//$('.bin-select-searchbtn').click();
					}else{
						params.checked=false;
						alert(res.content);
					}
				},'json');
		}
		function temCheck(id){
				var url = "/ws/index.php?g=admin&m=chat&a=temCheck";
				var data={
					'id':id
				}
				$.post(url,data,function(res){
					if(res.error==0){
						$('.bin-select-searchbtn').click();
					}else{
						alert(res.content);
					}
				},'json');
		}
		function temCheckAll(){
			$("#temCheckAll_html").html("<span class='am-icon-plus'></span> 勾选添加中...");
			var uids = '';
			var isCheck = true;
			if ($("input[name='ids']:checked").length > 0) {
				$("input[name='ids']:checked").each(function() {
					if($(this).attr("data-temp-status")!=6){
						isCheck = false;
					}else{
						uids += "," + $(this).val();
					}
				})
				if(isCheck){
					uids = uids.substring(1);
				}else{
					$("#temCheckAll_html").html("<span class='am-icon-plus'></span> 勾选添加至实时审核");
					alert("请选择未经审核的数据");
					return;
				}
			} else {
				$("#temCheckAll_html").html("<span class='am-icon-plus'></span> 勾选添加至实时审核");
				alert("请勾选需要临时添加至实时审核的未经审核数据");
				return;
			}
				var url = "/ws/index.php?g=admin&m=chat&a=temCheck";
				var data={
					'id':uids
				}
				$.post(url,data,function(res){
					if(res.error==0){
						window.location.href="index.php?g=admin&m=chat&a=library";
					}else{
						alert(res.content);
					}
					$("#temCheckAll_html").html("<span class='am-icon-plus'></span> 勾选添加至实时审核");
				},'json');
		}
   </script>
	</body>
</html>
<?php }} ?>
